﻿using FanaticRock.MediaSource.BilibiliAPI.Helpers;

namespace FanaticRock.Test
{
    internal class Program
    {
        private const string SESSDATA = @"ff086906%2C1721911908%2C97209%2A11CjCCuB6pAgFNE2WCUL_qjN9HbA5SV512NmU2ftgmmkyO8vo4KHLm5nkKYDAxgqDppDcSVkJzOGpDUGN3cHY1UlVqSnc5ZnNnV1Q2aGlLV1U0TThpazN5ZUUxT1JNWWVhelhmeC1aQzhTd095U05vQ2tZaGpkbkRVU3luVGo2ei1aM1hHTGtJX1hRIIEC";
        private const string MId = @"337176361";
        static void Main(string[] args)
        {
            Run();
            Console.Read();
        }


        static async Task Run()
        {
            var bvid = "BV1aP4y1w7kQ";

            var view = await FanaticRock.MediaSource.BilibiliAPI.API.WebInterface.View.InvokeByBvid(bvid);
            var cid = view.Data.Pages.FirstOrDefault().Cid;
            Console.WriteLine(cid);

            var playUrlDto = await FanaticRock.MediaSource.BilibiliAPI.API.Player.Wbi.PlayUrl.Invoke(new MediaSource.BilibiliAPI.RequestVo.Player.Wbi.PlayUrlRequestVo()
            {
                Bvid = bvid,
                Cid = cid,
                Fnval = MediaSource.BilibiliAPI.Enums.FnvalEnum.Fnval_DASH,
            });

            Console.WriteLine(playUrlDto);
        }

    }
}
